package com.ht.aems.fesservice.job;

import com.ht.log.HisDBBackup;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Dong Shufeng
 *         Date: 2010-9-1
 */
public class LogBackupJob implements Job {
    private static Logger log = Logger.getLogger(FC102CallAllJob.class);
    private static boolean isRunning = false;

    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        if (isRunning) return;
        try {
            isRunning = true;
            HisDBBackup.backupMsg();
        } catch (Exception e) {
            log.warn(e);
        } finally {
            isRunning = false;
        }
    }
}

